{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=437
  Verdict: Accepted
}
var a,b,c,r:longint;
begin
assign(input,'input.txt');
assign(output,'output.txt');
reset(input);
rewrite(output);
read(a,b,c,r);
write(a,' ',b,' ',r*(sqrt(a*a+b*b))+c);
end.